home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0292.ZIP
/
CUBS.ARC
/
MAIN.PRG
< prev
next >
Wrap
Text File
|
1985-12-21
|
10KB
|
456 lines
*MAIN.PRG
PROCEDURE ldrprint.prg
*LDRPRINT.PRG
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
?
WAIT ' Press any key to begin printing...'
SET TALK OFF
SET PRINT ON
? CHR(27)+CHR(99)+CHR(49)
SET MARGIN TO 3
?
?
? CHR(14)+CHR(27)+CHR(33)
? ' CUBSCOUT PACK 240'
? CHR(15)+' Vilseck, GE'
STORE DATE() TO MDATE
?
?
? ' ì
'+DTOC(MDATE)
?
?
? CHR(27)+CHR(81)+CHR(27)+CHR(34)
? 'SCOUT POSITION RESIDENCE ì
MAILING ADDRESS HOME DUTY'
?
STORE 0 TO LINECNT
DO WHILE .NOT. EOF()
IF DTOC(LEFT) = ' / / '
? SCOUT, POSITION, RESIDENCE, ADDRESS, HOME, DUTY
?
LINECNT = LINECNT + 1
SKIP
IF LINECNT >21
? CHR(10)+CHR(10)+CHR(10)+CHR(10)+CHR(10)+CHR(10)
? CHR(10)+CHR(10)+CHR(10)
? 'SCOUT POSITION RESIDENCE ì
MAILING ADDRESS HOME DUTY '
?
STORE 0 TO LINECNT
ENDIF
ENDIF
ENDDO
?
?
? CHR(27)+CHR(69)
? 'Records Reported'+STR(LINECNT)
? CHR(12)
SET PRINT OFF
RETURN
return
PROCEDURE rosters.prg
*ROSTERS.PRG
CLEAR
SET TALK OFF
? ' PRINT MENU'
?
?
?
?
? ' 1. Print All Rosters 6. Print Den 3 '
?
? ' 2. Print Leaders Only 7. Print Den W1 '
?
? ' 3. Print All Cubs 8. Print Den W2 '
?
? ' 4. Print Den 1 9. Not Used '
?
? ' 5. Print Den 2 0. Exit to Main Menu'
?
?
?
?
WAIT ' PICK A NUMBER...' TO CHOICE
DO CASE
CASE CHOICE = '1'
SELECT 2
GO TOP
SET FILTER TO DTOC(LEFT) = ' / / '
DO LDRPRINT
SELECT 1
GO TOP
STORE ' ALLCUBS' TO MDEN
SET FILTER TO DTOC(LEFT) = ' / / '
DO CUBPRINT
SELECT 1
SET FILTER TO DEN = '1' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE ' DEN 1' TO MDEN
DO CUBPRINT
SELECT 1
SET FILTER TO DEN = '2' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE ' DEN 2' TO MDEN
DO CUBPRINT
SELECT 1
SET FILTER TO DEN = '3' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE ' DEN 3' TO MDEN
DO CUBPRINT
SELECT 1
SET FILTER TO DEN = 'W1' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE 'DEN W1' TO MDEN
DO CUBPRINT
SELECT 1
SET FILTER TO DEN = 'W2' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE 'DEN W2' TO MDEN
DO CUBPRINT
CASE CHOICE = '2'
SELECT 2
SET FILTER TO DTOC(LEFT) = ' / / '
GO TOP
DO LDRPRINT
CASE CHOICE = '3'
SELECT 1
SET FILTER TO DTOC(LEFT) = ' / / '
GO TOP
STORE ' ALLCUBS' TO MDEN
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
?
WAIT ' Press any key to begin printing...'
DO CUBPRINT
CASE CHOICE = '4'
SELECT 1
SET FILTER TO DEN = '1' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE ' DEN 1' TO MDEN
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
?
WAIT ' Press any key to begin printing...'
DO CUBPRINT
CASE CHOICE = '5'
SELECT 1
SET FILTER TO DEN = '2' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE ' DEN 2' TO MDEN
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
?
WAIT ' Press any key to begin printing...'
DO CUBPRINT
CASE CHOICE = '6'
SELECT 1
SET FILTER TO DEN = '3' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE ' DEN 3' TO MDEN
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
?
WAIT ' Press any key to begin printing...'
DO CUBPRINT
CASE CHOICE = '7'
SELECT 1
SET FILTER TO DEN = 'W1' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE 'DEN W1' TO MDEN
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
?
WAIT ' Press any key to begin printing...'
DO CUBPRINT
CASE CHOICE = '8'
SELECT 1
SET FILTER TO DEN = 'W2' .AND. DTOC(LEFT) = ' / / '
GO TOP
STORE 'DEN W2' TO MDEN
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
?
WAIT ' Press any key to begin printing...'
DO CUBPRINT
CASE CHOICE = '9'
CASE CHOICE = '0'
RETURN
RELEASE ALL
ENDCASE CHOICE
ENDDO
return
PROCEDURE cubprint.prg
*CUBPRINT.PRG
CLEAR
SET TALK OFF
SET PRINT ON
SET MARGIN TO 5
? CHR(27)+CHR(99)+CHR(49)
?
?
?
?
? CHR(14)+CHR(27)+CHR(33)
? ' CUBSCOUT PACK 240'
? CHR(15)+' Vilseck, GE'
?
?
STORE DATE() TO MDATE
IF MDEN = ' ALLCUBS'
? ' ì
'+MDEN
ELSE
? ' ì
'+MDEN
ENDIF
? ' '+DTOC(MDATE)
?
?
?
? CHR(27)+CHR(81)+CHR(27)+CHR(34)
? 'SCOUT DOB RESIDENCE ì
HOME DUTY DEN'
?
STORE 1 TO PAGCNT
STORE 0 TO PAGECNT
STORE 0 TO LINECNT
DO WHILE .NOT. EOF()
IF DTOC(LEFT) = ' / / ';*
? SCOUT, DOB, ' ', RESIDENCE,' ', HOME, DUTY, DEN
?
LINECNT = LINECNT+1
SKIP
IF LINECNT >21
?
? CHR(12)
? CHR(10)+CHR(10)+CHR(10)+CHR(10)
? 'SCOUT DOB RESIDENCE ì
HOME DUTY DEN'
?
STORE 0 TO LINECNT
PAGECNT = PAGECNT + 1
PAGCNT = PAGCNT + 1
ENDIF
ENDIF;*
ENDDO
?
? CHR(27)+CHR(69)
? 'RECORDS REPORTED' +STR(LINECNT + PAGECNT * 22)
?
?
*? ' Page ' +STR(PAGCNT)
? CHR(12)
SET PRINT OFF
RETURN
return
PROCEDURE search.prg
*SEARCH.PRG
CLEAR
? ' The entire name is not required, just enough to identify ì
him.'
?
? ' Capitalization must be correct!'
?
?
ACCEPT "Enter Scout's last name, first name " to cubber
FIND &CUBBER
IF EOF() = .T.
CLEAR
@ 12,23 say "Couldn't find that Cub Scout"
?
?
?
?
?
?
?
WAIT
RETURN
ELSE
SET FORMAT TO LOOKCUB
EDIT
return
PROCEDURE stats.prg
*STATS.PRG
SET TALK OFF
CLEAR
?
? " I'm counting Leaders"
SELECT 2
COUNT TO MLDR
? ' '+STR(MLDR)
SELECT 1
?
CLEAR
? " Now I'm counting Cub Scouts"
COUNT TO MCUBS FOR DTOC(LEFT) = ' / / '
? ' '+STR(MCUBS)
COUNT FOR DEN = '1' .AND. DTOC(LEFT) = ' / / ' TO CNT1
COUNT FOR DEN = '2' .AND. DTOC(LEFT) = ' / / ' TO CNT2
COUNT FOR DEN = '3' .AND. DTOC(LEFT) = ' / / ' TO CNT3
CLEAR
?
?
?
CLEAR
? ' Where did you get all these kids?'
COUNT FOR DEN = 'W1' .AND. DTOC(LEFT) = ' / / ' TO CNTW1
COUNT FOR DEN = 'W2' .AND. DTOC(LEFT) = ' / / ' TO CNTW2
STORE 'Y' TO LOOKING
STORE 1 TO TRIPS
GO TOP
DO WHILE .NOT. EOF()
DO WHILE LOOKING = 'y' .OR. LOOKING = 'Y'
CLEAR
? CHR(10)+CHR(10)+CHR(10)
? ' PACK STATISTICS ì
'+DTOC(DATE())
?
? ' Ldrs Cubs Den 1 Den 2 Den 3 DenW1 ì
DenW2'
?
? STR(MLDR)+STR(MCUBS)+STR(CNT1)+STR(CNT2)+STR(CNT3)+STR(CNTW1)+STR(CNTW2)
?
?
?
? ' Webelos approaching 11 years of age'
?
SET HEADING OFF
DISPLAY OFF FIELDS ' ',SCOUT, DOB,' ', DEN FOR ì
DOB < DATE() - 3970 .AND. DTOC(LEFT) = ' / / '
?
?
? ' Cub Scouts approaching 10 years of age'
?
DISPLAY OFF FIELDS ' ',SCOUT, DOB, ' ', DEN FOR DOB ì
< DATE() - 3565 .AND. DEN <> 'W1' .AND. DEN <> 'W2' .AND. ì
DTOC(LEFT) = ' / / '
* This routine computes tenure in unit
GO TOP
SET DECIMALS TO 1
DO WHILE .NOT. EOF()
IF DTOC(LEFT) = ' / / '
STORE (DATE() - JOINED)/30 TO MTENURE
ENDIF
IF DTOC(LEFT) <> ' / / '
STORE (LEFT-JOINED)/30 TO MROTATE
REPLACE ROTATE WITH MROTATE
REPLACE TENURE WITH MTENURE
ENDIF
SKIP
ENDDO
AVERAGE TENURE TO FRED
?
? ' AVERAGE TENURE OF PRESENT CUBS '+STR(FRED)+' ì
Months'
AVERAGE ROTATE FOR ROTATE > 0 TO MROTATE
?
? ' AVERAGE TENURE OF DEPARTED CUBS'+STR(MROTATE)+' ì
Months'
?
*end of tenure routine
*? CHR(12)
SET PRINT OFF
TRIPS = TRIPS + 1
IF TRIPS < 3
WAIT 'Do You Want Hardcopy? (Y/N)' TO LOOKING
IF LOOKING = 'Y' .OR. LOOKING = 'y'
CLEAR
? ' ALIGN TOP OF PAPER WITH PRINTHEAD'
WAIT
SET PRINT ON
? CHR(27)+CHR(99)+CHR(49)
? CHR(27)+CHR(33)
LOOP
ELSE
ENDDO
ENDIF
ENDIF
RELEASE ALL
CLEAR
SET PRINT OFF
RETURN
return
PROCEDURE lookldr.prg
*LOOKLDR.PRG
CLEAR
? ' The entire name is not required, just enough to identify him.'
?
? ' Capitalization must be correct!'
?
?
ACCEPT "Enter Leader's last name, first name " to cubber
FIND &CUBBER
IF EOF() = .T.
CLEAR
@ 12,22 SAY "Couldn't find that Leader"
?
?
?
?
?
?
?
?
WAIT
RETURN
ELSE
SET FORMAT TO LOOKLDR
EDIT
return